import Http from '@/lib/axios'

const prefix = '/viewcc'

export interface IEnterpriseData {
  id?: string
  key: string
  value?: string
}

export interface ICommon {
  getEnterprise: (data: IEnterpriseData) => Http
}

export default class Common extends Http implements ICommon {
  getEnterprise(data: IEnterpriseData) {
    return this.post(`${prefix}/get`, data)
  }

  setEnterprise(data: IEnterpriseData) {
    return this.post(`${prefix}/set`, data)
  }

  getEnterpriseData(data) {
    return this.post(`/get_enterprise_list`, data)
  }
  setEnterpriseData(data) {
    return this.post(`/set_enterprise_data`, data)
  }
}
